<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<c:set var="page" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>
<link type="text/stylesheet" href="${page}/static/inspinia/js/plugins/LD.sot/multiupf/uploadify2/uploadify.css">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>INSPINIA | Basic Form</title>
    <script type="text/javascript" charset="utf-8" src="${ctx}/static/inspinia/js/plugins/ueditor-1.4.3.3/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="${ctx}/static/inspinia/js/plugins/ueditor-1.4.3.3/_examples/editor_api.js"></script>
    <script type="text/javascript" charset="utf-8" src="${ctx}/static/inspinia/js/plugins/ueditor-1.4.3.3/lang/zh-cn/zh-cn.js"></script>



    <style>
        .imager {
            margin: 0;
            padding: 0;
            width: 90px;
            height: 90px;
            float: left;
            background-color: #fff;
            text-align: center;
            vertical-align: middle;
            line-height: 81px;
            color: #000;
            border-radius: 4px;
        }

        .imager img {
            border-radius: 4px;
        }

        .upload {
            margin: 0;
            padding: 0;
            width: 83px;
            height: 31px;
            float: left;
            margin: 59px 0 0 11px;
        }
        .biref_words {
            color:red;
        }
        .marks_star{
            color:red;
        }
    </style>
</head>



<body>

<div id="wrapper">
    <div class="gray-bg">
        <div class="row  m-t-sm">
            <div class="col-lg-12">
                <ol class="breadcrumb f-fl">
                    <li>
                        <i class="fa fa-location-arrow"></i> <a>资讯分类管理</a>
                    </li>
                    <li class="active">
                        <c:if test="${mhInfoClassify.id != null}">
                            <strong>修改</strong>
                        </c:if>
                        <c:if test="${mhInfoClassify.id == null || mhInfoClassify.id == ''}">
                            <strong>新增</strong>
                        </c:if>
                    </li>
                </ol>
                <span class="navbar-right  m-r m-t-8"><a href="javascript:history.go(-1);" class="btn-primary btn-add "> <i class='fa fa-mail-reply'></i> 返回</a></span>
            </div>
        </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>注意： <small>请慎重修改.</small></h5>
                        </div>
                        <div class="ibox-content">
                            <form method="get" data-ajax="${ctx}/admin/info/infoClassify/list" action="${ctx}/admin/info/infoClassify/save"  class="form-horizontal" id="base_form">
                                <input  type="hidden" name="id" value="${mhInfoClassify.id}"/>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="text-danger">*</span>类型名称</label>
                                    <div class="col-sm-3"><input type="text" class="form-control" placeholder="类型名称" value="${mhInfoClassify.title}" name="title" required></div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="text-danger">*</span>排序</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" placeholder="请输入序号"
                                               value="${mhInfoClassify.sortNumber}" name="sortNumber" required />
                                    </div>
                                </div>

                                <div class="hr-line-dashed"></div>
                                <div class="form-group">
                                    <div class="col-sm-4 col-sm-offset-2">
                                        <button class="btn btn-primary" type="submit" >保 存</button>
                                        <a href="javascript:history.go(-1);" class="btn btn-white ">  取消</a>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

<script type="text/javascript" src="${page}/static/inspinia/js/plugins/LD.sot/multiupf/uploadify2/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="${page}/static/inspinia/js/plugins/LD.sot/multiupf/uploadify2/swfobject.js"></script>
<script type="text/javascript" src="${page}/static/inspinia/js/plugins/LD.sot/multiupf/multiupf.uploadify2.js"></script>
<script>


    function dataCheck() {
        var mobile = $("[name='sortNumber']").val();
        var myreg = /^[1-9]\d*$/;
        if(!myreg.test(mobile)) {
            layer.alert('请输入有效的排序！');
            return false;
        }
        return true;
    }

    function save(obj) {
        if (!dataCheck()) {
            return;
        }
        var isOk = $("#base_form").valid();
        if (isOk) {
            $(obj).attr('disabled', 'disabled');
            $("#base_form").submit();
        }
    }


</script>
</body>

</html>
